# 请使用最新版Clash
# 将proxy-providers里面链接中的“你的订阅链接”全部替换即可
mixed-port: 7890
allow-lan: true
bind-address: '*'
mode: rule
log-level: info
ipv6: true
external-controller: 127.0.0.1:9090

proxy-providers:
  #全部节点
  All:
    type: http
    url: "https://api.v1.mk/sub?target=clash&url=你的订阅链接&list=true&udp=true"
    # 可以使用任意类型的链接替换上面文字，多个链接使用英文符号的竖杠|隔开一起写上即可；也可以将Clash订阅链接替换掉整个引号""内的链接
    interval: 3600
    path: ./all.yaml
    health-check:
      enable: true
      interval: 600
      url: http://www.gstatic.com/generate_204
  #香港节点     
  HK:
    type: file
    path: ./all.yaml
    filter: 港|HK|(?i)Hong
    health-check:
      enable: true
      interval: 120
      url: http://www.gstatic.com/generate_204
 #日本节点
  JP:
    type: file
    path: ./all.yaml
    filter: 日|东京|JP|(?i)Japan
    health-check:
      enable: true
      interval: 120
      url: http://www.gstatic.com/generate_204
 #美国节点
  US:
    type: file
    path: ./all.yaml
    filter: 美|US|(?i)States|American
    health-check:
      enable: true
      interval: 120
      url: http://www.gstatic.com/generate_204
 #台湾节点
  TW:
    type: file
    path: ./all.yaml
    filter: 台|湾|TW|(?i)Taiwan
    health-check:
      enable: true
      interval: 120
      url: http://www.gstatic.com/generate_204
      
dns:
  enable: true
  ipv6: true
  listen: 0.0.0.0:53
  default-nameserver:
    - 119.29.29.29
    - 223.5.5.5
    - 8.8.4.4
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  fake-ip-filter:
    - '*.lan'
    - localhost.ptlogin2.qq.com
    - '+.srv.nintendo.net'
    - '+.stun.playstation.net'
    - '+.msftconnecttest.com'
    - '+.msftncsi.com'
    - '+.xboxlive.com'
    - 'msftconnecttest.com'
    - 'xbox.*.microsoft.com'
    - '*.battlenet.com.cn'
    - '*.battlenet.com'
    - '*.blzstatic.cn'
    - '*.battle.net'
  nameserver:
    - https://doh.pub/dns-query
    - https://dns.alidns.com/dns-query
    - https://dns.google/dns-query
    
proxies:

            
proxy-groups:
  - name: 🚀 手动切换
    type: select
    use:
      - All
    proxies:
      - ✈️ 自动选择

  - name: ✈️ 自动选择
    type: url-test
    use: 
       - All
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  - name: 🎬 YouTube
    type: select
    proxies:
      - 🚀 手动切换
      - ✈️ 自动选择
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🇨🇳 台湾节点
      - DIRECT

  - name: 🎬 NETFLIX
    type: select
    proxies:
      - 🚀 手动切换
      - ✈️ 自动选择
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🇨🇳 台湾节点
      - DIRECT

  - name: 🎬 Disney+
    type: select
    proxies:
      - 🚀 手动切换
      - ✈️ 自动选择
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🇨🇳 台湾节点
      - DIRECT

  - name: 🎬 巴哈姆特
    type: select
    proxies:
      - 🇨🇳 台湾节点
      - ✈️ 自动选择
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🚀 手动切换
      - DIRECT

  - name: 🆎 AdBlock
    type: select
    proxies:
      - REJECT
      - 🚀 手动切换

  - name: 🌏 国外网站
    type: select
    proxies:
      - 🚀 手动切换
      - ✈️ 自动选择
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🇨🇳 台湾节点
      - DIRECT

  - name: 🍎 苹果服务
    type: select
    proxies:
      - DIRECT
      - 🚀 手动切换
      - ✈️ 自动选择
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🇨🇳 台湾节点

  - name: 🧩 微软服务
    type: select
    proxies:
      - DIRECT
      - 🚀 手动切换
      - ✈️ 自动选择
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🇨🇳 台湾节点

  - name: 🎶 网易音乐
    type: select
    proxies:
      - DIRECT

  - name: 🎬 哔哩哔哩
    type: select
    proxies:
      - DIRECT
      - 🚀 手动切换
      - ✈️ 自动选择
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🇨🇳 台湾节点

  - name: 🎮 游戏平台
    type: select
    proxies:
      - 🚀 手动切换
      - DIRECT
      - ✈️ 自动选择
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🇨🇳 台湾节点

  - name: 🌏 国内网站
    type: select
    proxies:
      - DIRECT
      - 🚀 手动切换
      - ✈️ 自动选择
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🇨🇳 台湾节点

  - name: 🐟 漏网之鱼
    type: select
    proxies:
      - 🚀 手动切换
      - DIRECT
      - ✈️ 自动选择
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🇨🇳 台湾节点
  - name: 🇭🇰 香港节点
    type: select
    use:
      - HK
    proxies:
      - DIRECT
  - name: 🇯🇵 日本节点
    type: select
    use:
      - JP
    proxies:
      - DIRECT
  - name: 🇨🇳 台湾节点
    type: select
    use:
      - TW
    proxies:
      - DIRECT
  - name: 🇺🇲 美国节点
    type: select
    use:
      - US
    proxies:
      - DIRECT

rule-providers:

  Direct:
    type: http
    behavior: classical
    url: "https://ghproxy.com/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Direct/Direct.yaml"
    path: ./ruleset/direct.yaml
    interval: 86400

  adblock:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Advertising/Advertising_Classical.yaml"
    path: ./ruleset/Advertising_Classical.yaml
    interval: 86400
        
  YouTube:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/YouTube/YouTube.yaml"
    path: ./ruleset/YouTube.yaml
    interval: 86400

  Netflix:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Netflix/Netflix.yaml"
    path: ./ruleset/Netflix.yaml
    interval: 86400

  Disney:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Disney/Disney.yaml"
    path: ./ruleset/Disney.yaml
    interval: 86400

  Bahamut:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Bahamut/Bahamut.yaml"
    path: ./ruleset/Bahamut.yaml
    interval: 86400

  Apple:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Apple/Apple.yaml"
    path: ./ruleset/Apple.yaml
    interval: 86400

  NetEaseMusic:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/NetEaseMusic/NetEaseMusic.yaml"
    path: ./ruleset/NetEaseMusic.yaml
    interval: 86400
    
  Microsoft:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Microsoft/Microsoft.yaml"
    path: ./ruleset/Microsoft.yaml
    interval: 86400

  BiliBili:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/BiliBili/BiliBili.yaml"
    path: ./ruleset/BiliBili.yaml
    interval: 86400

  Game:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Game/Game.yaml"
    path: ./ruleset/Game.yaml
    interval: 86400

  China:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/China/China.yaml"
    path: ./ruleset/China.yaml
    interval: 86400

  Global_Classical:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/Global/Global_Classical.yaml"
    path: ./ruleset/Global_Classical.yaml
    interval: 86400



rules:
  - RULE-SET,Direct,DIRECT
  - RULE-SET,adblock,🆎 AdBlock
  - RULE-SET,YouTube,🎬 YouTube
  - RULE-SET,Netflix,🎬 NETFLIX
  - RULE-SET,Disney,🎬 Disney+
  - RULE-SET,Bahamut,🎬 巴哈姆特
  - RULE-SET,Apple,🍎 苹果服务
  - RULE-SET,Microsoft,🧩 微软服务
  - RULE-SET,NetEaseMusic,🎶 网易音乐
  - RULE-SET,BiliBili,🎬 哔哩哔哩
  - RULE-SET,Game,🎮 游戏平台
  - RULE-SET,Global_Classical,🌏 国外网站
  - RULE-SET,China,🌏 国内网站
  - IP-CIDR,192.168.0.0/16,DIRECT
  - IP-CIDR,10.0.0.0/8,DIRECT
  - IP-CIDR,172.16.0.0/12,DIRECT
  - IP-CIDR,127.0.0.0/8,DIRECT
  - IP-CIDR,100.64.0.0/10,DIRECT
  - IP-CIDR,224.0.0.0/4,DIRECT
  - IP-CIDR,fe80::/10,DIRECT
  - IP-CIDR,119.28.28.28/32,DIRECT
  - IP-CIDR,182.254.116.0/24,DIRECT
  - GEOIP,CN,🌏 国内网站
  - MATCH,🐟 漏网之鱼
